

#ifndef UD_DBFILER_H
#define UD_DBFILER_H

#include <stdarg.h>
#include "zAdAChar.h"
#include "zacdb.h"
#include "zgepnt2d.h"
#include "zgepnt3d.h"
#include "zgevec3d.h"
#include "zgescl3d.h"
#include "zadsdef.h"
#pragma pack (push, 8)

class UcDbAuditInfo;
class UcDbFilerController;
class UcDbHandle;
class UcDbIdRefQueue;
class UcString;

class ZSOFT_NO_VTABLE UcDbDwgFiler: public UcRxObject
{
  public:
    UCRX_DECLARE_MEMBERS(UcDbDwgFiler);
    UcDbDwgFiler();
    virtual ~UcDbDwgFiler();

    virtual  Ucad::ErrorStatus filerStatus() const = 0;
    virtual  UcDb::FilerType   filerType() const = 0;
    virtual void               setFilerStatus(Ucad::ErrorStatus) = 0;
    virtual void               resetFilerStatus() = 0;

    virtual  Ucad::ErrorStatus  dwgVersion(UcDb::UcDbDwgVersion &,
                                UcDb::MaintenanceReleaseVersion &) const;

    virtual Ucad::ErrorStatus   readHardOwnershipId(UcDbHardOwnershipId*) = 0;
    virtual Ucad::ErrorStatus   writeHardOwnershipId(
                                  const UcDbHardOwnershipId&) = 0;

    virtual Ucad::ErrorStatus   readSoftOwnershipId(UcDbSoftOwnershipId*) = 0;
    virtual Ucad::ErrorStatus   writeSoftOwnershipId(
                                  const UcDbSoftOwnershipId&) = 0;

    virtual Ucad::ErrorStatus   readHardPointerId(UcDbHardPointerId*) = 0;
    virtual Ucad::ErrorStatus   writeHardPointerId(const UcDbHardPointerId&) = 0;

    virtual Ucad::ErrorStatus   readSoftPointerId(UcDbSoftPointerId*) = 0;
    virtual Ucad::ErrorStatus   writeSoftPointerId(const UcDbSoftPointerId&) = 0;

    virtual Ucad::ErrorStatus   readInt8(ZSoft::Int8 *) = 0;
    virtual Ucad::ErrorStatus   writeInt8(ZSoft::Int8 ) = 0;

    inline  Ucad::ErrorStatus   readChar(ZSoft::Int8 *p) {
                                        return this->readInt8(p); }
    inline  Ucad::ErrorStatus   writeChar(ZSoft::Int8 c) {
                                        return this->writeInt8(c); }

    virtual Ucad::ErrorStatus   readString(ZTCHAR**) = 0;
    virtual Ucad::ErrorStatus   writeString(const ZTCHAR*) = 0;

    virtual Ucad::ErrorStatus   readString(UcString &) = 0;
    virtual Ucad::ErrorStatus   writeString(const UcString &) = 0;

    virtual Ucad::ErrorStatus   readBChunk(zds_binary *) = 0;
    virtual Ucad::ErrorStatus   writeBChunk(const zds_binary&) = 0;

    virtual Ucad::ErrorStatus   readUcDbHandle(UcDbHandle*) = 0;
    virtual Ucad::ErrorStatus   writeUcDbHandle(const UcDbHandle&) = 0;

    virtual Ucad::ErrorStatus   readInt64(ZSoft::Int64*) = 0;
    virtual Ucad::ErrorStatus   writeInt64(ZSoft::Int64) = 0;

    virtual Ucad::ErrorStatus   readInt32(ZSoft::Int32*) = 0;
    virtual Ucad::ErrorStatus   writeInt32(ZSoft::Int32) = 0;

    virtual Ucad::ErrorStatus   readInt16(ZSoft::Int16*) = 0;
    virtual Ucad::ErrorStatus   writeInt16(ZSoft::Int16) = 0;

    virtual Ucad::ErrorStatus   readUInt64(ZSoft::UInt64*) = 0;
    virtual Ucad::ErrorStatus   writeUInt64(ZSoft::UInt64) = 0;

    virtual Ucad::ErrorStatus   readUInt32(ZSoft::UInt32*) = 0;
    virtual Ucad::ErrorStatus   writeUInt32(ZSoft::UInt32) = 0;

    virtual Ucad::ErrorStatus   readUInt16(ZSoft::UInt16*) = 0;
    virtual Ucad::ErrorStatus   writeUInt16(ZSoft::UInt16) = 0;

    virtual Ucad::ErrorStatus   readUInt8(ZSoft::UInt8*) = 0;
    virtual Ucad::ErrorStatus   writeUInt8(ZSoft::UInt8) = 0;

    virtual Ucad::ErrorStatus   readBoolean(ZSoft::Boolean*) = 0;
    virtual Ucad::ErrorStatus   writeBoolean(ZSoft::Boolean) = 0;

    virtual Ucad::ErrorStatus   readBool(bool*) = 0;
    virtual Ucad::ErrorStatus   writeBool(bool) = 0;

    virtual Ucad::ErrorStatus   readDouble(double*) = 0;
    virtual Ucad::ErrorStatus   writeDouble(double) = 0;

    virtual Ucad::ErrorStatus   readPoint2d(UcGePoint2d*) = 0;
    virtual Ucad::ErrorStatus   writePoint2d(const UcGePoint2d&) = 0;

    virtual Ucad::ErrorStatus   readPoint3d(UcGePoint3d*) = 0;
    virtual Ucad::ErrorStatus   writePoint3d(const UcGePoint3d&) = 0;

    virtual Ucad::ErrorStatus   readVector2d(UcGeVector2d*) = 0;
    virtual Ucad::ErrorStatus   writeVector2d(const UcGeVector2d&) = 0;

    virtual Ucad::ErrorStatus   readVector3d(UcGeVector3d*) = 0;
    virtual Ucad::ErrorStatus   writeVector3d(const UcGeVector3d&) = 0;

    virtual Ucad::ErrorStatus   readScale3d(UcGeScale3d*) = 0;
    virtual Ucad::ErrorStatus   writeScale3d(const UcGeScale3d&) = 0;

    virtual Ucad::ErrorStatus   readBytes(void *, ZSoft::UIntPtr) = 0;
    virtual Ucad::ErrorStatus   writeBytes(const void *, ZSoft::UIntPtr) = 0;

    virtual Ucad::ErrorStatus   readAddress(void **);
    virtual Ucad::ErrorStatus   writeAddress(const void *);

            Ucad::ErrorStatus   readItem(UcDbHardOwnershipId*);
            Ucad::ErrorStatus   writeItem(const UcDbHardOwnershipId&);

            Ucad::ErrorStatus   readItem(UcDbSoftOwnershipId*);
            Ucad::ErrorStatus   writeItem(const UcDbSoftOwnershipId&);

            Ucad::ErrorStatus   readItem(UcDbHardPointerId*);
            Ucad::ErrorStatus   writeItem(const UcDbHardPointerId&);

            Ucad::ErrorStatus   readItem(UcDbSoftPointerId*);
            Ucad::ErrorStatus   writeItem(const UcDbSoftPointerId&);


            Ucad::ErrorStatus   readItem(ZTCHAR**);
            Ucad::ErrorStatus   writeItem(const ZTCHAR*);

            Ucad::ErrorStatus   readItem(zds_binary*);
            Ucad::ErrorStatus   writeItem(const zds_binary&);

            Ucad::ErrorStatus   readItem(UcDbHandle*);
            Ucad::ErrorStatus   writeItem(const UcDbHandle&);

            Ucad::ErrorStatus   readItem(ZSoft::Int32*);
            Ucad::ErrorStatus   writeItem(ZSoft::Int32);

            Ucad::ErrorStatus   readItem(ZSoft::Int16*);
            Ucad::ErrorStatus   writeItem(ZSoft::Int16);

            Ucad::ErrorStatus   readItem(ZSoft::Int8 *);
            Ucad::ErrorStatus   writeItem(ZSoft::Int8);

            Ucad::ErrorStatus   readItem(ZSoft::UInt32*);
            Ucad::ErrorStatus   writeItem(ZSoft::UInt32);

            Ucad::ErrorStatus   readItem(ZSoft::UInt16*);
            Ucad::ErrorStatus   writeItem(ZSoft::UInt16);

            Ucad::ErrorStatus   readItem(ZSoft::UInt8*);
            Ucad::ErrorStatus   writeItem(ZSoft::UInt8);

            Ucad::ErrorStatus   readItem(ZSoft::Boolean*);
            Ucad::ErrorStatus   writeItem(ZSoft::Boolean);

#if !defined(ZSoft_Boolean_is_bool) 
            Ucad::ErrorStatus   readItem(bool*);
            Ucad::ErrorStatus   writeItem(bool);
#endif 

            Ucad::ErrorStatus   readItem(double*);
            Ucad::ErrorStatus   writeItem(double);

            Ucad::ErrorStatus   readItem(UcGePoint2d*);
            Ucad::ErrorStatus   writeItem(const UcGePoint2d&);

            Ucad::ErrorStatus   readItem(UcGePoint3d*);
            Ucad::ErrorStatus   writeItem(const UcGePoint3d&);

            Ucad::ErrorStatus   readItem(UcGeVector2d*);
            Ucad::ErrorStatus   writeItem(const UcGeVector2d&);

            Ucad::ErrorStatus   readItem(UcGeVector3d*);
            Ucad::ErrorStatus   writeItem(const UcGeVector3d&);

            Ucad::ErrorStatus   readItem(UcGeScale3d*);
            Ucad::ErrorStatus   writeItem(const UcGeScale3d&);

            Ucad::ErrorStatus   readItem(void *, ZSoft::UIntPtr);
            Ucad::ErrorStatus   writeItem(const void *, ZSoft::UIntPtr);

            Ucad::ErrorStatus   readItem(void **);
            Ucad::ErrorStatus   writeItem(const void *);

    virtual Ucad::ErrorStatus   seek(ZSoft::Int64 offset, int method) = 0;
    virtual              ZSoft::Int64   tell() const = 0;
    virtual Ucad::ErrorStatus   addReferences(UcDbIdRefQueue& );
    virtual              bool   usesReferences() const;
    virtual UcDbAuditInfo *     getAuditInfo() const;

    virtual UcDbFilerController& controller() const;

private:
            UcDbFilerController& mController;
};

class ZSOFT_NO_VTABLE UcDbDxfFiler: public UcRxObject
{
public:
    UCRX_DECLARE_MEMBERS(UcDbDxfFiler);

    virtual int               rewindFiler() = 0;

    virtual Ucad::ErrorStatus filerStatus() const = 0;
    virtual void              resetFilerStatus() = 0;

    virtual Ucad::ErrorStatus setError(Ucad::ErrorStatus, const ZTCHAR*, ...);
    virtual Ucad::ErrorStatus setError(const ZTCHAR*, ...);
    virtual const ZTCHAR* errorMessage() const;

    virtual  UcDb::FilerType filerType() const = 0;

    virtual  UcDbDatabase*      database() const = 0;

    virtual  Ucad::ErrorStatus  dwgVersion(UcDb::UcDbDwgVersion &,
                                UcDb::MaintenanceReleaseVersion &) const;

    virtual int                 precision() const;
    virtual void                setPrecision(int prec);

    enum { kDfltPrec = -1, kMaxPrec  = 16 };

    virtual Ucad::ErrorStatus readResBuf   (resbuf*);
    virtual Ucad::ErrorStatus writeResBuf  (const resbuf&);
    virtual Ucad::ErrorStatus writeObjectId(UcDb::DxfCode,
                                            const UcDbObjectId&) = 0;
    virtual Ucad::ErrorStatus writeInt8    (UcDb::DxfCode, ZSoft::Int8) = 0;
    inline  Ucad::ErrorStatus writeChar    (UcDb::DxfCode c, ZSoft::Int8 n) {
                                return this->writeInt8(c, n); }
    virtual Ucad::ErrorStatus writeString  (UcDb::DxfCode, const ZTCHAR*) = 0;
    virtual Ucad::ErrorStatus writeString  (UcDb::DxfCode, const UcString &) = 0;
    virtual Ucad::ErrorStatus writeBChunk  (UcDb::DxfCode, const zds_binary&) = 0;
    virtual Ucad::ErrorStatus writeUcDbHandle(UcDb::DxfCode,
                                              const UcDbHandle&) = 0;
	virtual Ucad::ErrorStatus writeInt64   (UcDb::DxfCode, ZSoft::Int64) = 0;
    virtual Ucad::ErrorStatus writeInt32   (UcDb::DxfCode, ZSoft::Int32) = 0;
    virtual Ucad::ErrorStatus writeInt16   (UcDb::DxfCode, ZSoft::Int16) = 0;
	virtual Ucad::ErrorStatus writeUInt64  (UcDb::DxfCode, ZSoft::UInt64) = 0;
    virtual Ucad::ErrorStatus writeUInt32  (UcDb::DxfCode, ZSoft::UInt32) = 0;
    virtual Ucad::ErrorStatus writeUInt16  (UcDb::DxfCode, ZSoft::UInt16) = 0;
    virtual Ucad::ErrorStatus writeUInt8   (UcDb::DxfCode, ZSoft::UInt8) = 0;
    virtual Ucad::ErrorStatus writeBoolean (UcDb::DxfCode, ZSoft::Boolean) = 0;
    virtual Ucad::ErrorStatus writeBool    (UcDb::DxfCode, bool) = 0;
    virtual Ucad::ErrorStatus writeDouble  (UcDb::DxfCode, double,
                                            int = kDfltPrec) = 0;
    virtual Ucad::ErrorStatus writePoint2d (UcDb::DxfCode, const UcGePoint2d&,
                                            int = kDfltPrec) = 0;
    virtual Ucad::ErrorStatus writePoint3d (UcDb::DxfCode, const UcGePoint3d&,
                                               int = kDfltPrec) = 0;
    virtual Ucad::ErrorStatus writeVector2d(UcDb::DxfCode, const UcGeVector2d&,
                                            int = kDfltPrec) = 0;
    virtual Ucad::ErrorStatus writeVector3d(UcDb::DxfCode, const UcGeVector3d&,
                                            int = kDfltPrec) = 0;
    virtual Ucad::ErrorStatus writeScale3d (UcDb::DxfCode, const UcGeScale3d&,
                                            int = kDfltPrec) = 0;

    Ucad::ErrorStatus readItem        (resbuf* pItem);
    Ucad::ErrorStatus writeItem (const resbuf& pItem);
    Ucad::ErrorStatus writeItem (UcDb::DxfCode, const UcDbObjectId&);

    Ucad::ErrorStatus writeItem (UcDb::DxfCode, const ZTCHAR*);
    Ucad::ErrorStatus writeItem (UcDb::DxfCode, const zds_binary&);
    Ucad::ErrorStatus writeItem (UcDb::DxfCode, const UcDbHandle&);

	Ucad::ErrorStatus writeItem (UcDb::DxfCode, ZSoft::Int64) { return Ucad::eOk; }
    Ucad::ErrorStatus writeItem (UcDb::DxfCode, ZSoft::Int32);
    Ucad::ErrorStatus writeItem (UcDb::DxfCode, ZSoft::Int16);
    Ucad::ErrorStatus writeItem (UcDb::DxfCode, ZSoft::Int8);
    Ucad::ErrorStatus writeItem (UcDb::DxfCode, ZSoft::UInt32);
    Ucad::ErrorStatus writeItem (UcDb::DxfCode, ZSoft::UInt16);
    Ucad::ErrorStatus writeItem (UcDb::DxfCode, ZSoft::UInt8);
#ifndef ZSoft_Boolean_is_bool
    Ucad::ErrorStatus writeItem (UcDb::DxfCode, ZSoft::Boolean);
#endif
    Ucad::ErrorStatus writeItem (UcDb::DxfCode, bool);
    Ucad::ErrorStatus writeItem (UcDb::DxfCode, double, int = kDfltPrec);
    Ucad::ErrorStatus writeItem (UcDb::DxfCode, const UcGePoint2d&,
                                 int = kDfltPrec);
    Ucad::ErrorStatus writeItem (UcDb::DxfCode, const UcGePoint3d&,
                                 int = kDfltPrec);
    Ucad::ErrorStatus writeItem (UcDb::DxfCode, const UcGeVector2d&,
                                 int = kDfltPrec);
    Ucad::ErrorStatus writeItem (UcDb::DxfCode, const UcGeVector3d&,
                                 int = kDfltPrec);
    Ucad::ErrorStatus writeItem (UcDb::DxfCode, const UcGeScale3d&,
                                 int = kDfltPrec);

    virtual Ucad::ErrorStatus writeXDataStart ();
    virtual bool              includesDefaultValues() const = 0;

    virtual Ucad::ErrorStatus pushBackItem();
    virtual bool              atEOF();
    virtual bool              atSubclassData(const ZTCHAR *);
    virtual bool              atExtendedData();
    virtual bool              atEndOfObject();
    virtual void              haltAtClassBoundries(bool);

    virtual Ucad::ErrorStatus writeEmbeddedObjectStart();
    virtual bool              atEmbeddedObjectStart();

    virtual double elevation() const;
    virtual double thickness() const;

    virtual bool              isModifyingExistingObject() const;

    UcDbDxfFiler();
    virtual ~UcDbDxfFiler();
    UcDbFilerController& controller() const;

private:
    UcDbFilerController& mController;
    virtual Ucad::ErrorStatus setVAError(Ucad::ErrorStatus, const ZTCHAR*, va_list);
};

inline Ucad::ErrorStatus UcDbDwgFiler::readItem(UcDbHardOwnershipId* pId)
{   return readHardOwnershipId(pId); }

inline Ucad::ErrorStatus UcDbDwgFiler::writeItem(const UcDbHardOwnershipId& pId)
{   return writeHardOwnershipId(pId); }

inline Ucad::ErrorStatus UcDbDwgFiler::readItem(UcDbSoftOwnershipId* pId)
{   return readSoftOwnershipId(pId); }

inline Ucad::ErrorStatus UcDbDwgFiler::writeItem(const UcDbSoftOwnershipId& pId)
{   return writeSoftOwnershipId(pId); }

inline Ucad::ErrorStatus UcDbDwgFiler::readItem(UcDbHardPointerId* pId)
{   return readHardPointerId(pId); }

inline Ucad::ErrorStatus UcDbDwgFiler::writeItem(const UcDbHardPointerId& pId)
{   return writeHardPointerId(pId); }

inline Ucad::ErrorStatus UcDbDwgFiler::readItem(UcDbSoftPointerId* pId)
{   return readSoftPointerId(pId); }

inline Ucad::ErrorStatus UcDbDwgFiler::writeItem(const UcDbSoftPointerId& pId)
{   return writeSoftPointerId(pId); }

inline Ucad::ErrorStatus UcDbDwgFiler::readItem(ZTCHAR** pVal)
{   return readString(pVal);            }

inline Ucad::ErrorStatus UcDbDwgFiler::writeItem(const ZTCHAR* val)
{   return writeString(val);            }

inline Ucad::ErrorStatus UcDbDwgFiler::readItem(zds_binary* pVal)
{   return readBChunk(pVal);            }

inline Ucad::ErrorStatus UcDbDwgFiler::writeItem(const zds_binary& val)
{   return writeBChunk(val);            }

inline Ucad::ErrorStatus UcDbDwgFiler::readItem(UcDbHandle* pVal)
{   return readUcDbHandle(pVal);    }

inline Ucad::ErrorStatus UcDbDwgFiler::writeItem(const UcDbHandle& val)
{   return writeUcDbHandle(val);    }

inline Ucad::ErrorStatus UcDbDwgFiler::readItem(ZSoft::Int32* pVal)
{   return readInt32(pVal);            }

inline Ucad::ErrorStatus UcDbDwgFiler::writeItem(ZSoft::Int32 val)
{   return writeInt32(val);            }

inline Ucad::ErrorStatus UcDbDwgFiler::readItem(ZSoft::Int16* pVal)
{   return readInt16(pVal);            }

inline Ucad::ErrorStatus UcDbDwgFiler::writeItem(ZSoft::Int16 val)
{   return writeInt16(val);            }

inline Ucad::ErrorStatus UcDbDwgFiler::readItem(ZSoft::Int8 * pVal)
{   return this->readInt8(pVal);       }

inline Ucad::ErrorStatus UcDbDwgFiler::writeItem(ZSoft::Int8 val)
{   return this->writeInt8(val);       }

inline Ucad::ErrorStatus UcDbDwgFiler::readItem(ZSoft::UInt32* pVal)
{   return readUInt32(pVal);            }

inline Ucad::ErrorStatus UcDbDwgFiler::writeItem(ZSoft::UInt32 val)
{   return writeUInt32(val);            }

inline Ucad::ErrorStatus UcDbDwgFiler::readItem(ZSoft::UInt16* pVal)
{   return readUInt16(pVal);            }

inline Ucad::ErrorStatus UcDbDwgFiler::writeItem(ZSoft::UInt16 val)
{   return writeUInt16(val);            }

inline Ucad::ErrorStatus UcDbDwgFiler::readItem(ZSoft::UInt8* pVal)
{   return readUInt8(pVal);            }

inline Ucad::ErrorStatus UcDbDwgFiler::writeItem(ZSoft::UInt8 val)
{   return writeUInt8(val);            }

#ifndef ZSoft_Boolean_is_bool
inline Ucad::ErrorStatus UcDbDwgFiler::readItem(ZSoft::Boolean* pVal)
{   return readBoolean(pVal);            }

inline Ucad::ErrorStatus UcDbDwgFiler::writeItem(ZSoft::Boolean val)
{   return writeBoolean(val);            }
#endif

inline Ucad::ErrorStatus UcDbDwgFiler::readItem(bool* pVal)
{   return readBool(pVal);              }

inline Ucad::ErrorStatus UcDbDwgFiler::writeItem(bool val)
{   return writeBool(val);              }

inline Ucad::ErrorStatus UcDbDwgFiler::readItem(double* pVal)
{   return readDouble(pVal);            }

inline Ucad::ErrorStatus UcDbDwgFiler::writeItem(double val)
{   return writeDouble(val);            }

inline Ucad::ErrorStatus UcDbDwgFiler::readItem(UcGePoint2d* pVal)
{   return readPoint2d(pVal);            }

inline Ucad::ErrorStatus UcDbDwgFiler::writeItem(const UcGePoint2d& val)
{   return writePoint2d(val);            }

inline Ucad::ErrorStatus UcDbDwgFiler::readItem(UcGePoint3d* pVal)
{   return readPoint3d(pVal);            }

inline Ucad::ErrorStatus UcDbDwgFiler::writeItem(const UcGePoint3d& val)
{   return writePoint3d(val);            }

inline Ucad::ErrorStatus UcDbDwgFiler::readItem(UcGeVector2d* pVal)
{   return readVector2d(pVal);            }

inline Ucad::ErrorStatus UcDbDwgFiler::writeItem(const UcGeVector2d& val)
{   return writeVector2d(val);            }

inline Ucad::ErrorStatus UcDbDwgFiler::readItem(UcGeVector3d* pVal)
{   return readVector3d(pVal);            }

inline Ucad::ErrorStatus UcDbDwgFiler::writeItem(const UcGeVector3d& val)
{   return writeVector3d(val);            }

inline Ucad::ErrorStatus UcDbDwgFiler::readItem(UcGeScale3d* pVal)
{   return readScale3d(pVal);            }

inline Ucad::ErrorStatus UcDbDwgFiler::writeItem(const UcGeScale3d& val)
{   return writeScale3d(val);            }

inline Ucad::ErrorStatus UcDbDwgFiler::readItem(void *buf, ZSoft::UIntPtr cnt)
{   return readBytes(buf, cnt);     }

inline Ucad::ErrorStatus 
UcDbDwgFiler::writeItem(const void *buf, ZSoft::UIntPtr cnt)
{   return writeBytes(buf, cnt);    }

inline Ucad::ErrorStatus UcDbDwgFiler::readItem(void **pp)
{   return readAddress(pp);            }

inline Ucad::ErrorStatus 
UcDbDwgFiler::writeItem(const void *p)
{   return writeAddress(p);            }

inline Ucad::ErrorStatus
UcDbDxfFiler::readItem(resbuf* pVal)
{   return readResBuf(pVal);         }

inline Ucad::ErrorStatus
UcDbDxfFiler::writeItem(const resbuf& val)
{   return writeResBuf(val);            }

inline Ucad::ErrorStatus
UcDbDxfFiler::writeItem(UcDb::DxfCode dc, const UcDbObjectId& id)
{   return writeObjectId(dc, id); }

inline Ucad::ErrorStatus
UcDbDxfFiler::writeItem(UcDb::DxfCode dc, const ZTCHAR* val)
{   return writeString(dc, val);        }

inline Ucad::ErrorStatus
UcDbDxfFiler::writeItem(UcDb::DxfCode dc, const zds_binary& val)
{   return writeBChunk(dc, val);        }

inline Ucad::ErrorStatus
UcDbDxfFiler::writeItem(UcDb::DxfCode dc, const UcDbHandle& val)
{   return writeUcDbHandle(dc, val);        }

inline Ucad::ErrorStatus
UcDbDxfFiler::writeItem(UcDb::DxfCode dc, ZSoft::Int32 val)
{   return writeInt32(dc, val);         }

inline Ucad::ErrorStatus
UcDbDxfFiler::writeItem(UcDb::DxfCode dc, ZSoft::Int16 val)
{   return writeInt16(dc, val);         }

inline Ucad::ErrorStatus
UcDbDxfFiler::writeItem(UcDb::DxfCode dc, ZSoft::Int8 val)
{   return this->writeInt8(dc, val);    }

inline Ucad::ErrorStatus
UcDbDxfFiler::writeItem(UcDb::DxfCode dc, ZSoft::UInt32 val)
{   return writeUInt32(dc, val);        }

inline Ucad::ErrorStatus
UcDbDxfFiler::writeItem(UcDb::DxfCode dc, ZSoft::UInt16 val)
{   return writeUInt16(dc, val);        }

inline Ucad::ErrorStatus
UcDbDxfFiler::writeItem(UcDb::DxfCode dc, ZSoft::UInt8 val)
{   return writeUInt8(dc, val);         }

#ifndef ZSoft_Boolean_is_bool
inline Ucad::ErrorStatus
UcDbDxfFiler::writeItem(UcDb::DxfCode dc, ZSoft::Boolean val)
{   return writeBoolean(dc, val);        }
#endif

inline Ucad::ErrorStatus
UcDbDxfFiler::writeItem(UcDb::DxfCode dc, bool val)
{   return writeBool(dc, val);        }

inline Ucad::ErrorStatus
UcDbDxfFiler::writeItem(UcDb::DxfCode dc, double val, int prec)
{   return writeDouble(dc, val, prec);        }

inline Ucad::ErrorStatus
UcDbDxfFiler::writeItem(UcDb::DxfCode dc, const UcGePoint2d& val, int prec)
{   return writePoint2d(dc, val, prec); }

inline Ucad::ErrorStatus
UcDbDxfFiler::writeItem(UcDb::DxfCode dc, const UcGePoint3d& val, int prec)
{   return writePoint3d(dc, val, prec); }

inline Ucad::ErrorStatus
UcDbDxfFiler::writeItem(UcDb::DxfCode dc, const UcGeVector2d& val, int prec)
{   return writeVector2d(dc, val, prec);        }

inline Ucad::ErrorStatus
UcDbDxfFiler::writeItem(UcDb::DxfCode dc, const UcGeVector3d& val, int prec)
{   return writeVector3d(dc, val, prec);        }

inline Ucad::ErrorStatus
UcDbDxfFiler::writeItem(UcDb::DxfCode dc, const UcGeScale3d& val, int prec)
{   return writeScale3d(dc, val, prec); }

#pragma pack (pop)

#endif
